<template>
    <view class="successPage">
        <view class="iconBox">
            <image class="maxIcon" src="../../../../static/my/sign.success.png" mode=""></image>
            <text>兑换成功</text>
            <view class="box">
                <image src="../../../../static/my/shenye_icon.png" mode=""></image>
                <text class="t-1">神椰CoCo：</text>
                <text class="t-2">{{amount}}</text>
            </view>
        </view>
        <view class="info">
            <view class="list">
                <view class="lable">订单编号</view>
                <view class="txt">
                    <text class="shuzi ellipseHide">{{orderNo}}</text>
                    <text class="lan" @click="copy">复制</text>
                </view>
            </view>
            <view class="list">
                <view class="lable">交易时间</view>
                <view class="txt">{{tradeTime}}</view>
            </view>
        </view>
        <navigator url="/pages/my/shenye-coin/shenye-coin" open-type="reLaunch" hover-class="other-navigator-hover">
            <view class="btn">立即查看</view>
        </navigator>
        
    </view>
</template>

<script>
    export default {
        data() {
            return {
               num: 0, 
               orderNo: '',
               data: {},
               tradeTime: '',
               amount: '',
            }
        },
        onLoad(e){
            this.orderNo = e.orderNo
            this.tradeTime = e.tradeTime
            this.amount = e.amount
        },
        methods: {
            copy(){
            	if(this.orderNo != ''){
            		var _this = this
            		 _this.$copyText(_this.orderNo).then(
                        res => {
                          uni.showToast({
                            title: '复制成功',
                            icon: 'none'
                          })
                        }
                      )
            	}
            },
        }
    }
</script>

<style scoped>
.successPage{
    background: #fff;
    display: flex;
    flex-direction: column;
     align-items: center;
}
.iconBox {
    box-sizing: border-box;
    margin-top: 112rpx;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 34rpx;

}
.iconBox .maxIcon{
    width: 152rpx;
    height: 152rpx;
    border-radius: 50%;
}
.box{
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30rpx;
}
.box image{
    width: 34rpx;
    height: 34rpx;
}
.box .t-1{
    display: inline-block;
    font-size: 30rpx;
    color: #222;
    margin: 0 10rpx;
}
.box .t-2{
    font-size: 44rpx;
    color: #FF3A3A;
    font-weight: 500;
}
.info{
    display: flex;
    margin: 0 40rpx;
    border-top: 0.5px solid #D8D8D8;
    padding-top: 80rpx;
    flex-direction: column;
    width: calc(100% - 80rpx);

}
.list{
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18rpx;
    font-size: 28rpx;
}
.list .lable{
    color: #999999;
}
.list .txt{
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 500rpx;
    color: #000;
}
.list .txt .shuzi{
    width: 400rpx;
}
.list .txt .lan{
    color: #1774FF;
    margin-left: 10rpx;
}
.btn{
    width: 320rpx;
    height: 80rpx;
    border: 2rpx solid #1085F2;
    text-align: center;
    line-height: 80rpx;
    color: #0B87F2;
    border-radius: 80rpx;
    margin-top: 100rpx;
}
</style>
